package com.csxy.six.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csxy.six.entity.GoodsComment;
import com.csxy.six.mapper.GoodsCommentMapper;
import com.csxy.six.service.GoodsCommentService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsCommentServiceImpl extends ServiceImpl<GoodsCommentMapper, GoodsComment> implements GoodsCommentService {
    @Override
    public List<GoodsComment> getCommentsByGoodsId(Integer goodsId) {
        return this.list(new QueryWrapper<GoodsComment>().eq("goods_id", goodsId));
    }
}
